package com.wl.api.controller.business;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.wl.api.common.utils.JsonObject;
import com.wl.api.controller.base.CommonController;
import com.wl.api.model.business.CustomerProduct;
import com.wl.api.service.business.ICustomerProductService;

/**
 * 
 * @author cj
 * 客户产品
 */
@RestController
@RequestMapping("/external/customer/product")
public class ProductController extends CommonController {
	@Autowired
	ICustomerProductService customerProductSerivce;
	
	@RequestMapping(value="/manage", method= RequestMethod.GET)
	public JsonObject getProductList() {
		JsonObject json = JsonObject.getInstance();
		List<CustomerProduct> list = customerProductSerivce.selectList(new EntityWrapper<>(CustomerProduct.builder().isDeleted(0).build()));
		json.setData(list);
		setJsonMessage(json);
		return json;
	}
}

